<link rel="Stylesheet" type="text/css" href="<?php echo $base_url?>style/css/jquery.jmodal.css" />
<script language="javascript" src="<?php echo $base_url?>style/js/BE/jquery.jmodal.js"></script>
<script>
	var js_url="<?php echo $base_url;?>";
	var link_page_name="<?php echo $link_page_name;?>";
	var js_pagetitle="<?php echo $page_title?>";
</script>
<script language="javascript" src="<?php echo $base_url;?>style/js/BE/admin_news.js"></script>
<br />
<div style="padding:12px;">Danh sách <?php echo $page_title;?>:</div>
<div id="div_ajax_content" style="padding:0; margin:0;">
<?php if (count($aNewsCate)>0){?>
<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#3D84CC" style="margin:auto; line-height:20px;">
  <tr>
    <td width="5%" align="center" bgcolor="#3D84CC" class="title1">#</td>
    <td width="15%" align="center" bgcolor="#3D84CC" class="title1">Danh mục cấp cha</td>
    <td width="30%" align="center" bgcolor="#3D84CC" class="title1">Tên danh mục Tin tức</td>
    <td width="25%" align="center" bgcolor="#3D84CC" class="title1">SEO url</td>
		<td width="10%" align="center" bgcolor="#3D84CC" class="title1">Trạng thái</td>
    <td width="15%" align="center" bgcolor="#3D84CC" class="title1">Thao tác</td>    
  </tr>
<?php
		$i=1;
		$bgcolor="#FFFFFF";
		foreach($aNewsCate as $key=>$item):
			if ($i%2==0){$bgcolor="#EBF2F8";}else{$bgcolor="#FFFFFF";}
?>  
  <tr bgcolor="<?php echo $bgcolor;?>">
    <td width="5%" align="center" class="index" valign="top"><?php echo $i;?></td>
    <td width="15%" align="center" class="content" style="text-align:left;" valign="top">
    <?php 
			if ($item->parent_name == "")
				echo "<span style='color:blue;'>&lt;không có&gt;</span>";
			else
				echo $item->parent_name;
		?><br />
    </td>      
    <td width="30%" align="center" class="content" style="text-align:left;" valign="top">
    <?php echo $item->cate_name;?><br />
    </td>
    <td width="25%" align="center" class="content" style="text-align:left;" valign="top">
    <?php echo $item->url;?><br />
    </td>    
    <td width="10%" align="center" class="content" style="text-align:center;" valign="top">
    <?php if ($item->status=="1") echo "Hiển thị"; else if ($item->status=="0") echo "Không hiển thị";
	?></td>	
    <td width="15%" class="content" style="text-align:center;" valign="top"><a href="<?php echo $base_url.$page_name;?>/newscate_edit/<?php echo $item->cate_id;?>">Chỉnh sửa</a></td>
  </tr>  
    <?php
				$i++;
      endforeach; 
    ?>  
</table>
</div>
<?php
} //if
else
{
?>
<table width="98%" border="0" cellpadding="0" cellspacing="1" style="margin:auto;">
  <tr>
  	<td style="text-align:center;" height="60px">Không tìm thấy thông tin.</td>
  </tr>
</table>  
<?php	
}
?>
<div style="padding:13px;"><b><u>Chú ý</u></b>: khi xóa <?php echo $page_title;?> --> vào file constants.php fill lại giá trị biến <b>NEWS_CATE_TXNK</b> ... <b>NEWS_CATE_NVK</b></div>